# -*- coding: utf-8 -*-
"""
@Author: thekernel
@Date: 2020/6/7 12:04
@Description: 
"""


def list_get(l, i, v=None):
    if -len(l) < i < len(l):
        return l[i]
    else:
        return v
